<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- layout::Public:top::60 -->
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>TDX指数</title>
        <script type='text/javascript' src='__PUBLIC__/JQuery/jquery-1.4.4.js'></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.core.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.effects.core.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.button.js"></script>
        <link rel="stylesheet" type="text/css" href="./Public/JQuery/themes/base/jquery.ui.all.css" >
        <script type='text/javascript' src='__PUBLIC__/js/pagecontrol.js'></script>
        <script type='text/javascript' src='__PUBLIC__/js/html.js'></script>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/grid.css">
        <style type="text/css">
            ul a{
                text-decoration: none;
                color: rgb(29,32,136);
            }
            ul a:hover{
                font-weight: bold;
                color: rgb(132,132,132);
            }
            .pageNum{border: 1px solid #999;padding:2px 8px;display: inline-block;}
            .cPageNum{font-weight: bold;padding:2px 5px;}
            #pageNav a:hover{background: #fff4d8; }
            #pageNav a{text-decoration: none;color:rgb(132,132,132);font-family:'Arial'}

            .tdxtitle{
                font-size:36px;
                font-family: 'SimHei';
                font-weight: bold;
                text-align: center;
                margin-top: 10px;
            }
            .tdxdate{
                font-size:12px;
                color:rgb(132,132,132);
                text-align:right;
                font-family: 'SimSun';
                margin-top: 10px;
            }
            .tdxcontent{
                margin-top: 15px;

            }
        </style>
    </head>
    <body>
        <script type="text/javascript">
            //For JQuery Functions
            $(document).ready(function()
            {
                perPage = 10;
                total = 0;
                displayed = false;
                pageNav.next = "\u4e0b\u4e00\u9875";
                pageNav.pre = "\u4e0a\u4e00\u9875";
                pageNav.fn = function(p, pn)
                {
                    $("#liTemplate").show();
                    var tmp = $("#liTemplate").clone();
                    $("ul").children().remove();
                    $("ul").append(tmp);
                    $.post("/TDX/index.php?s=/Core/jsonTDXList", {
                        'page'  :   p,
                        'per'   :   perPage
                    }, function(data){
                        gArray = data.data;
                        for(var i = 0; i < gArray.length; i++)
                        {
                            var tmp = $("#liTemplate").clone();
                            tmp.find('a').attr('index', i);
                            tmp.find('a').text(gArray[i].title);
                            tmp.find('span').css('color', 'rgb(132,132,132)');
                            tmp.find('span').css('font-size', '12px');
                            tmp.find('span').text('('+gArray[i].rtime+')');
                            tmp.find('a').click(function(){
                                var j = $(this).attr('index');
                                $("#tdxtitle").text(gArray[j].title);
                                $("#tdxdate").text('  作者:'+gArray[j].UID+'  最后修改日期：'+gArray[j].rtime);
                                $("#tdxcontent").html(htmlDecode(gArray[j].content));
                                $("#tdxcontent").find("img").each(function(){
                                    if($(this).attr("width") > 620)
                                    {
                                        //tweak it
                                        var y = $(this).attr("height");
                                        var x = $(this).attr("width");
                                        y = y * 620 / x;
                                        x = 620;
                                        $(this).attr("height", y);
                                        $(this).attr('width', x);
                                    }
                                })
                            })
                            $('ul').append(tmp);
                            if(!displayed)
                            {
                                $("ul").find("a").trigger("click", "");
                                displayed = true;
                            }
                        }
                        $("#liTemplate").hide();
                    }, "json")
                }
                $.post("/TDX/index.php?s=/Core/jsonTDXPages", {'per':perPage}, function(data){
                    total = parseInt(data.data);
                    pageNav.go(1, total);
                }, "json");
                $.post("/TDX/index.php?s=/User/jsonVerifyPrivilege", {'privilege':'ADMISSION_PUBLISH_TDX'}, function(data){
                    if(parseInt(data.data) == false)
                        $("#adminentry").hide();
                }, "json")
            });
            //For Pure JavaScript Functions
        
        </script>
        <!-- Contents here -->
        <div class="row">
            <div class="titlecolumn grid_12" style="text-align:left">
                <p class="smalltitle">最新一期TDX指数</p>
            </div>
            <div class="column grid_2" style="text-align:left">左广告位</div>
            <div class="column grid_8" style="text-align:left">
                <div id="tdxtitle" class="tdxtitle"></div>
                <div id="tdxdate" class="tdxdate"></div>
                <div id="tdxcontent" class="tdxcontent"></div>
            </div>
            <div class="column grid_2" style="text-align:left">右广告位</div>
        </div>
        <div class="row">
            <div class="titlecolumn grid_6" style="text-align:left">
                <p class="smalltitle">往期的TDX指数</p>
                <div id="tdxrates">
                    <ul type="circle">
                        <li id="liTemplate"><a index="" href="#">我是第一篇文章~</a><span class="date">(2011-11-19)</span></li>
                    </ul>
                </div>
                <div id="pageNav"></div>
            </div>
            <div class="titlecolumn grid_6" style="text-align:center">
                <p class="smalltitle">手册下载</p>
                <div class="grid_3" style="margin-left:40px">
                    <input type="button" class="btndownload" value="宣传页下载(PDF)" onmouseover="this.style.backgroundPosition='left -42px'" onmouseout="this.style.backgroundPosition='left top'" />
                </div>
                <div class="grid_3" style="margin-left:40px">
                    <input type="button" class="btndownload" value="投资者手册下载(PDF)" onmouseover="this.style.backgroundPosition='left -42px'" onmouseout="this.style.backgroundPosition='left top'" />
                </div>
                <div id="adminentry">
                    <p class="smalltitle">TDX指数发布入口</p>
                    <br/>
                    <a href="/TDX/index.php?s=/Core/TDXEstablish" class="headerlink headera">TDX指数发布</a>
                </div>
            </div>
        </div>
    </body>
    <!-- layout::Public:bottom::60 -->
</html>